var express = require('express');
var router = express.Router();
let {addGood,searchGood,getDetailGood,updateDetail,updateStatus,deleteGood}=require('../serve/goodsServe')

router.post('/addGoods',async(req,res,next)=>{
    let result=await addGood(req.body)
    res.send(result)
})
router.post('/searchGood',async(req,res,next)=>{
    let result=await searchGood(req.body)
    res.send(result)
})
router.post('/getDetail',async(req,res,next)=>{
    let result=await getDetailGood(req.body)
    res.send(result)
})
router.post('/updateDetail',async(req,res,next)=>{
    let result=await updateDetail(req.body)
    res.send(result)
})
router.post('/updateStatus',async(req,res,next)=>{
    let result=await updateStatus(req.body)
    res.send(result)
})
router.post('/deleteGood',async(req,res,next)=>{
    let result=await deleteGood(req.body)
    res.send(result)
})

module.exports=router


